﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<ali:Get ID="Position" Object="Position" InnerID="Request.QueryString['ID']" Validate="True" />
<section data-page="position_edit" data-title="编辑广告位" data-lang="<%=ContentLang%>" data-id="<%=Request.QueryString["ID"]%>">
	<dl class="path1">
		<dt><span>您的位置：</span><a href="list.aspx?Lang=<%=ContentLang%>" target="ali-navtab">广告位列表</a> → <b class="<%=ContentLang%>Font"><%=Position[Name]%></b></dt>
		<dd>
			<select data-ali-widget="combo" data-class="<%=ContentLang%>Font">
				<ali:List Mark="System" Object="Language" Source="Manager.Languages">
					<ali:Record>
						<%If Convert.ToString(Ab) == ContentLang%>
							<option value="<%=Ab%>" selected><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%Else%>
							<option value="<%=Ab%>"><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%EndIf%>
					</ali:Record>
				</ali:List>
			</select>
		</dd>
	</dl>
	<form action="?Lang=<%=ContentLang%>" class="post">
		<div class="post-body">
			<div class="ali-tabs" data-event="click">
				<div class="ali-tabs-header">
					<div class="ali-tabs-nav-container">
						<ul>
							<li class="ali-active"><a>编辑</a></li>
							<li><a href="../ad/list.aspx?Lang=<%=ContentLang%>&amp;PositionID=<%=Request.QueryString["ID"]%>" target="ali-navtab">广告列表</a></li>
							<li><a href="../ad/add.aspx?Lang=<%=ContentLang%>&amp;PositionID=<%=Request.QueryString["ID"]%>" target="ali-navtab">添加广告</a></li>
						</ul>				
					</div>
				</div>
				<div class="ali-tabs-body">
					<div class="ali-tabs-panel">
						<table class="post-table margin2">
							<tr>
								<th>名称：</th>
								<td>
									<input type="text" name="Name" value="<%=Position[Name]%>" size="40" maxlength="50" class="ali-input <%=ContentLang%>Font">
									<label><input type="checkbox" data-operation="CheckGuid">Guid：</label><input type="text" name="ID" value="<%=Position[ID]%>" size="40" maxlength="40" disabled class="ali-input ali-disabled">
								</td>
							</tr>
							<tr>
								<th>类型：</th>
								<td>
									<select name="TypeID" data-class="<%=ContentLang%>Font" data-ali-widget="combo">
										<option value="">--未指定--</option>
										<ali:List Object="Type">
											<ali:Record>
												<%If Guid.Equals(ID, Position[TypeID])%>
													<option value="<%=ID%>" selected><%=Name%></option>
												<%Else%>
													<option value="<%=ID%>"><%=Name%></option>
												<%EndIf%>
											</ali:Record>
										</ali:List>
									</select>
								</td>
							</tr>
							<tr>
								<th>尺寸（宽x高）：</th>
								<td>
									<input type="text" name="Width" value="<%=Position[Width]%>" size="10" maxlength="10" class="ali-input"> x
									<input type="text" name="Height" value="<%=Position[Height]%>" size="10" maxlength="10" class="ali-input"> 设置为0， 表示自适应。
								</td>
							</tr>
							<tr>
								<th>示意图：</th>
								<td>
									<input type="text" name="SketchMap" value="<%=Position[SketchMap]%>" size="55" class="ali-input"><a class="ali-button ali-uploader">浏览...</a><button type="button" class="ali-button" data-operation="SelectSketchMap">选择</button>
									<a href="<%=Position[SketchMap]%>" target="_blank"><img src="<%=Position[SketchMap]%>" height="22" alt="示意图"></a>
								</td>
							</tr>
							<tr>
								<th>默认标题：</th>
								<td><input type="text" name="Title" value="<%=Position[Title]%>" size="50" maxlength="255" class="ali-input <%=ContentLang%>Font"></td>
							</tr>
							<tr>
								<th>默认图片：</th>
								<td>
									<input type="text" name="Image" value="<%=Position[Image]%>" size="55" class="ali-input"><a class="ali-button ali-uploader">浏览...</a><button type="button" class="ali-button" data-operation="SelectImage">选择</button>
									<a href="<%=Position[Image]%>" target="_blank"><img src="<%=Position[Image]%>" height="22" alt="默认图片"></a><label><input type="checkbox" data-name="ImageWaterMark">水印</label>
								</td>
							</tr>
							<tr>
								<th>默认链接：</th>
								<td><input type="text" name="URL" value="<%=Position[URL]%>" size="50" maxlength="255" class="ali-input"></td>
							</tr>
							<tr>
								<th>默认代码：</th>
								<td><textarea name="Code" cols="70" rows="6" wrap="off" class="ali-input"><%=HttpUtility.HtmlEncode(Position[Code].ToString())%></textarea></td>
							</tr>
							<tr>
								<th>价格：</th>
								<td>
									按时长计费：<input type="text" name="Price" value="<%=Convert.ToDecimal(Position[Price]).ToString("0.00")%>" size="5" maxlength="10" class="ali-input">元/<input type="text" name="Duration" value="<%=Position[Duration]%>" size="5" maxlength="10" class="ali-input">天
									按点击计费：<input type="text" name="ClickPrice" value="<%=Convert.ToDecimal(Position[ClickPrice]).ToString("0.00")%>" size="5" maxlength="10" class="ali-input">元/次
								</td>
							</tr>
							<tr>
								<th>描述：</th>
								<td>
									<textarea name="Description" cols="70" rows="6" wrap="off" class="ali-input <%=ContentLang%>Font"><%=HttpUtility.HtmlEncode(Position[Description].ToString())%></textarea>
								</td>
							</tr>
							<tr>
								<th>是否空缺：</th>
								<td>
									<%If Convert.ToBoolean(Position[IsAvailable])%>
										<label><input type="radio" name="IsAvailable" value="true" checked>是</label>
										<label><input type="radio" name="IsAvailable" value="false">否</label>
									<%Else%>
										<label><input type="radio" name="IsAvailable" value="true">是</label>
										<label><input type="radio" name="IsAvailable" value="false" checked>否</label>
									<%EndIf%>
								</td>
							</tr>
						</table>
					</div>
				</div>
				<div class="ali-tabs-bottom"><b></b></div>
			</div>
		</div>
		<div class="post-footer"><button type="submit" class="ali-button">保 存</button><input type="hidden" name="PictureAllowedType" value="gif|jpg|jpeg|png|bmp|png"></div>
	</form>
</section>